﻿

var UrlImagesPath = "";

var _FunImages = {
    fileUploadify: function (fileID, ajaxPath, tip, fileNum, fileSizeLimit, fileTypeExts, fileTypeDesc, buttonImage,exRes) {
        //SetFile.queueID = tip;
        jQuery("#" + fileID + "").uploadify({
            'width': SetFile.uploadify.width, 'height': SetFile.uploadify.height,
            //'buttonImage': SetFile.uploadify.buttonImage,
            'buttonImage': buttonImage,
            'multi': SetFile.uploadify.multi,
            'auto': SetFile.uploadify.auto,
            'successTimeout': 1000,
            //'onComplete': fun,
            'swf': SetFile.uploadify.swf,
            //'queueID': SetFile.uploadify.queueID,
            'queueID': tip,
            'uploader': ajaxPath,
            //'fileTypeExts': SetFile.uploadify.fileTypeExts,
            'fileTypeExts': fileTypeExts,
            //'fileTypeDesc': SetFile.uploadify.fileTypeDesc,
            'fileTypeDesc': fileTypeDesc,
            //'fileSizeLimit': SetFile.uploadify.fileSizeLimit,
            'fileSizeLimit': fileSizeLimit,
            //'queueSizeLimit': SetFile.uploadify.queueSizeLimit,
            'queueSizeLimit': fileNum,
            'progressData': 'speed',
            'overrideEvents': ['onDialogClose'],
            'buttonText': SetFile.uploadify.buttonText,
            'onSelectError': function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        Msg.tip("error", "上传的文件数量已经超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'queueSizeLimit') + "个文件！", "");
                        break;
                    case -110:
                        Msg.tip("error", "文件 [" + file.name + "] 大小超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'fileSizeLimit') + "大小！", "");
                        break;
                    case -120:
                        Msg.tip("error", "文件 [" + file.name + "] 大小异常！", "");
                        break;
                    case -130:
                        Msg.tip("error", "文件 [" + file.name + "] 类型不正确！", "");
                        break;
                }
            },
            'onClearQueue': function (queueItemCount) {
                //alert("取消上传");
                return;
            },
            'onQueueComplete': function (queueData) {
                //alert("文件上传成功！");
                return;
            },
            'onUploadSuccess': function (file, data, response) {
                exRes(data);
            }

        });
    }
};


//var UrlImagesPath = "";
//var _FunImages = {
//    fileUploadify: function (fileID, ajaxPath, imgPathID, imgInfoClass) {
//        //JinDu = fileID;
//        jQuery("#" + fileID + "").uploadify({
//            'width': Set.uploadify.width, 'height': Set.uploadify.height,
//            'buttonImage': Set.uploadify.buttonImage,
//            'multi': Set.uploadify.multi,
//            'auto': Set.uploadify.auto,
//            'successTimeout': 1000,
//            //'onComplete': fun,
//            'swf': Set.uploadify.swf,
//            'queueID': Set.uploadify.queueID,
//            'uploader': ajaxPath,
//            'fileTypeExts': Set.uploadify.fileTypeExts,
//            'fileTypeDesc': Set.uploadify.fileTypeDesc,
//            'fileSizeLimit': Set.uploadify.fileSizeLimit,
//            'queueSizeLimit': Set.uploadify.queueSizeLimit,
//            'progressData': 'speed',
//            'overrideEvents': ['onDialogClose'],
//            'buttonText': Set.uploadify.buttonText,
//            'onSelectError': function (file, errorCode, errorMsg) {
//                switch (errorCode) {
//                    case -100:
//                        Msg.tip("error", "上传的文件数量已经超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'queueSizeLimit') + "个文件！", "");
//                        break;
//                    case -110:
//                        Msg.tip("error", "文件 [" + file.name + "] 大小超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'fileSizeLimit') + "大小！", "");
//                        break;
//                    case -120:
//                        Msg.tip("error", "文件 [" + file.name + "] 大小异常！", "");
//                        break;
//                    case -130:
//                        Msg.tip("error", "文件 [" + file.name + "] 类型不正确！", "");
//                        break;
//                }
//            },
//            'onClearQueue': function (queueItemCount) {
//                //alert("取消上传");
//                return;
//            },
//            'onQueueComplete': function (queueData) {
//                //alert("文件上传成功！");
//                return;
//            },
//            'onUploadSuccess': function (file, data, response) {
//                US(data);
//            }

//        });
//    }
//};
var _Fun1 = {
    fileUploadify: function (fileID, ajaxPath, imgPathID, imgInfoClass) {
        //JinDu = fileID;
        jQuery("#" + fileID + "").uploadify({
            'width': Set.uploadify.width, 'height': Set.uploadify.height,
            'buttonImage': Set.uploadify.buttonImage,
            'multi': Set.uploadify.multi,
            'auto': Set.uploadify.auto,
            'successTimeout': 1000,
            //'onComplete': fun,
            'swf': Set.uploadify.swf,
            'queueID': Set.uploadify.queueID,
            'uploader': ajaxPath,
            'fileTypeExts': Set.uploadify.fileTypeExts,
            'fileTypeDesc': Set.uploadify.fileTypeDesc,
            'fileSizeLimit': Set.uploadify.fileSizeLimit,
            'queueSizeLimit': Set.uploadify.queueSizeLimit,
            'progressData': 'speed',
            'overrideEvents': ['onDialogClose'],
            'buttonText': Set.uploadify.buttonText,
            'onSelectError': function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        Msg.tip("error", "上传的文件数量已经超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'queueSizeLimit') + "个文件！", "");
                        break;
                    case -110:
                        Msg.tip("error", "文件 [" + file.name + "] 大小超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'fileSizeLimit') + "大小！", "");
                        break;
                    case -120:
                        Msg.tip("error", "文件 [" + file.name + "] 大小异常！", "");
                        break;
                    case -130:
                        Msg.tip("error", "文件 [" + file.name + "] 类型不正确！", "");
                        break;
                }
            },
            'onClearQueue': function (queueItemCount) {
                //alert("取消上传");
                return;
            },
            'onQueueComplete': function (queueData) {
                //alert("文件上传成功！");
                return;
            },
            'onUploadSuccess': function (file, data, response) {
                US1(data);
            }

        });
    }
};
var _Fun2 = {
    fileUploadify: function (fileID, ajaxPath, imgPathID, imgInfoClass) {
        //JinDu = fileID;
        jQuery("#" + fileID + "").uploadify({
            'width': Set.uploadify.width, 'height': Set.uploadify.height,
            'buttonImage': Set.uploadify.buttonImage,
            'multi': Set.uploadify.multi,
            'auto': Set.uploadify.auto,
            'successTimeout': 1000,
            //'onComplete': fun,
            'swf': Set.uploadify.swf,
            'queueID': Set.uploadify.queueID,
            'uploader': ajaxPath,
            'fileTypeExts': Set.uploadify.fileTypeExts,
            'fileTypeDesc': Set.uploadify.fileTypeDesc,
            'fileSizeLimit': Set.uploadify.fileSizeLimit,
            'queueSizeLimit': Set.uploadify.queueSizeLimit,
            'progressData': 'speed',
            'overrideEvents': ['onDialogClose'],
            'buttonText': Set.uploadify.buttonText,
            'onSelectError': function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        Msg.tip("error", "上传的文件数量已经超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'queueSizeLimit') + "个文件！", "");
                        break;
                    case -110:
                        Msg.tip("error", "文件 [" + file.name + "] 大小超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'fileSizeLimit') + "大小！", "");
                        break;
                    case -120:
                        Msg.tip("error", "文件 [" + file.name + "] 大小异常！", "");
                        break;
                    case -130:
                        Msg.tip("error", "文件 [" + file.name + "] 类型不正确！", "");
                        break;
                }
            },
            'onClearQueue': function (queueItemCount) {
                //alert("取消上传");
                return;
            },
            'onQueueComplete': function (queueData) {
                //alert("文件上传成功！");
                return;
            },
            'onUploadSuccess': function (file, data, response) {
                US2(data);
            }

        });
    }
};
var _Fun3 = {
    fileUploadify: function (fileID, ajaxPath, imgPathID, imgInfoClass) {
        //JinDu = fileID;
        jQuery("#" + fileID + "").uploadify({
            'width': Set.uploadify.width, 'height': Set.uploadify.height,
            'buttonImage': Set.uploadify.buttonImage,
            'multi': Set.uploadify.multi,
            'auto': Set.uploadify.auto,
            'successTimeout': 1000,
            //'onComplete': fun,
            'swf': Set.uploadify.swf,
            'queueID': Set.uploadify.queueID,
            'uploader': ajaxPath,
            'fileTypeExts': Set.uploadify.fileTypeExts,
            'fileTypeDesc': Set.uploadify.fileTypeDesc,
            'fileSizeLimit': Set.uploadify.fileSizeLimit,
            'queueSizeLimit': Set.uploadify.queueSizeLimit,
            'progressData': 'speed',
            'overrideEvents': ['onDialogClose'],
            'buttonText': Set.uploadify.buttonText,
            'onSelectError': function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        Msg.tip("error", "上传的文件数量已经超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'queueSizeLimit') + "个文件！", "");
                        break;
                    case -110:
                        Msg.tip("error", "文件 [" + file.name + "] 大小超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'fileSizeLimit') + "大小！", "");
                        break;
                    case -120:
                        Msg.tip("error", "文件 [" + file.name + "] 大小异常！", "");
                        break;
                    case -130:
                        Msg.tip("error", "文件 [" + file.name + "] 类型不正确！", "");
                        break;
                }
            },
            'onClearQueue': function (queueItemCount) {
                //alert("取消上传");
                return;
            },
            'onQueueComplete': function (queueData) {
                //alert("文件上传成功！");
                return;
            },
            'onUploadSuccess': function (file, data, response) {
                US3(data);
            }

        });
    }
};
var _Fun4 = {
    fileUploadify: function (fileID, ajaxPath, imgPathID, imgInfoClass) {
        //JinDu = fileID;
        jQuery("#" + fileID + "").uploadify({
            'width': Set.uploadify.width, 'height': Set.uploadify.height,
            'buttonImage': Set.uploadify.buttonImage,
            'multi': Set.uploadify.multi,
            'auto': Set.uploadify.auto,
            'successTimeout': 1000,
            //'onComplete': fun,
            'swf': Set.uploadify.swf,
            'queueID': Set.uploadify.queueID,
            'uploader': ajaxPath,
            'fileTypeExts': Set.uploadify.fileTypeExts,
            'fileTypeDesc': Set.uploadify.fileTypeDesc,
            'fileSizeLimit': Set.uploadify.fileSizeLimit,
            'queueSizeLimit': Set.uploadify.queueSizeLimit,
            'progressData': 'speed',
            'overrideEvents': ['onDialogClose'],
            'buttonText': Set.uploadify.buttonText,
            'onSelectError': function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        Msg.tip("error", "上传的文件数量已经超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'queueSizeLimit') + "个文件！", "");
                        break;
                    case -110:
                        Msg.tip("error", "文件 [" + file.name + "] 大小超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'fileSizeLimit') + "大小！", "");
                        break;
                    case -120:
                        Msg.tip("error", "文件 [" + file.name + "] 大小异常！", "");
                        break;
                    case -130:
                        Msg.tip("error", "文件 [" + file.name + "] 类型不正确！", "");
                        break;
                }
            },
            'onClearQueue': function (queueItemCount) {
                //alert("取消上传");
                return;
            },
            'onQueueComplete': function (queueData) {
                //alert("文件上传成功！");
                return;
            },
            'onUploadSuccess': function (file, data, response) {
                US4(data);
            }

        });
    }
};
var _Fun5 = {
    fileUploadify: function (fileID, ajaxPath, imgPathID, imgInfoClass) {
        //JinDu = fileID;
        jQuery("#" + fileID + "").uploadify({
            'width': Set.uploadify.width, 'height': Set.uploadify.height,
            'buttonImage': Set.uploadify.buttonImage,
            'multi': Set.uploadify.multi,
            'auto': Set.uploadify.auto,
            'successTimeout': 1000,
            //'onComplete': fun,
            'swf': Set.uploadify.swf,
            'queueID': Set.uploadify.queueID,
            'uploader': ajaxPath,
            'fileTypeExts': Set.uploadify.fileTypeExts,
            'fileTypeDesc': Set.uploadify.fileTypeDesc,
            'fileSizeLimit': Set.uploadify.fileSizeLimit,
            'queueSizeLimit': Set.uploadify.queueSizeLimit,
            'progressData': 'speed',
            'overrideEvents': ['onDialogClose'],
            'buttonText': Set.uploadify.buttonText,
            'onSelectError': function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        Msg.tip("error", "上传的文件数量已经超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'queueSizeLimit') + "个文件！", "");
                        break;
                    case -110:
                        Msg.tip("error", "文件 [" + file.name + "] 大小超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'fileSizeLimit') + "大小！", "");
                        break;
                    case -120:
                        Msg.tip("error", "文件 [" + file.name + "] 大小异常！", "");
                        break;
                    case -130:
                        Msg.tip("error", "文件 [" + file.name + "] 类型不正确！", "");
                        break;
                }
            },
            'onClearQueue': function (queueItemCount) {
                //alert("取消上传");
                return;
            },
            'onQueueComplete': function (queueData) {
                //alert("文件上传成功！");
                return;
            },
            'onUploadSuccess': function (file, data, response) {
                US5(data);
            }

        });
    }
};
var _Fun6 = {
    fileUploadify: function (fileID, ajaxPath, imgPathID, imgInfoClass) {
        //JinDu = fileID;
        jQuery("#" + fileID + "").uploadify({
            'width': Set.uploadify.width, 'height': Set.uploadify.height,
            'buttonImage': Set.uploadify.buttonImage,
            'multi': Set.uploadify.multi,
            'auto': Set.uploadify.auto,
            'successTimeout': 1000,
            //'onComplete': fun,
            'swf': Set.uploadify.swf,
            'queueID': Set.uploadify.queueID,
            'uploader': ajaxPath,
            'fileTypeExts': Set.uploadify.fileTypeExts,
            'fileTypeDesc': Set.uploadify.fileTypeDesc,
            'fileSizeLimit': Set.uploadify.fileSizeLimit,
            'queueSizeLimit': Set.uploadify.queueSizeLimit,
            'progressData': 'speed',
            'overrideEvents': ['onDialogClose'],
            'buttonText': Set.uploadify.buttonText,
            'onSelectError': function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        Msg.tip("error", "上传的文件数量已经超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'queueSizeLimit') + "个文件！", "");
                        break;
                    case -110:
                        Msg.tip("error", "文件 [" + file.name + "] 大小超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'fileSizeLimit') + "大小！", "");
                        break;
                    case -120:
                        Msg.tip("error", "文件 [" + file.name + "] 大小异常！", "");
                        break;
                    case -130:
                        Msg.tip("error", "文件 [" + file.name + "] 类型不正确！", "");
                        break;
                }
            },
            'onClearQueue': function (queueItemCount) {
                //alert("取消上传");
                return;
            },
            'onQueueComplete': function (queueData) {
                //alert("文件上传成功！");
                return;
            },
            'onUploadSuccess': function (file, data, response) {
                US6(data);
            }

        });
    }
};
var _Fun7 = {
    fileUploadify: function (fileID, ajaxPath, imgPathID, imgInfoClass) {
        //JinDu = fileID;
        jQuery("#" + fileID + "").uploadify({
            'width': Set.uploadify.width, 'height': Set.uploadify.height,
            'buttonImage': Set.uploadify.buttonImage,
            'multi': Set.uploadify.multi,
            'auto': Set.uploadify.auto,
            'successTimeout': 1000,
            //'onComplete': fun,
            'swf': Set.uploadify.swf,
            'queueID': Set.uploadify.queueID,
            'uploader': ajaxPath,
            'fileTypeExts': Set.uploadify.fileTypeExts,
            'fileTypeDesc': Set.uploadify.fileTypeDesc,
            'fileSizeLimit': Set.uploadify.fileSizeLimit,
            'queueSizeLimit': Set.uploadify.queueSizeLimit,
            'progressData': 'speed',
            'overrideEvents': ['onDialogClose'],
            'buttonText': Set.uploadify.buttonText,
            'onSelectError': function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        Msg.tip("error", "上传的文件数量已经超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'queueSizeLimit') + "个文件！", "");
                        break;
                    case -110:
                        Msg.tip("error", "文件 [" + file.name + "] 大小超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'fileSizeLimit') + "大小！", "");
                        break;
                    case -120:
                        Msg.tip("error", "文件 [" + file.name + "] 大小异常！", "");
                        break;
                    case -130:
                        Msg.tip("error", "文件 [" + file.name + "] 类型不正确！", "");
                        break;
                }
            },
            'onClearQueue': function (queueItemCount) {
                //alert("取消上传");
                return;
            },
            'onQueueComplete': function (queueData) {
                //alert("文件上传成功！");
                return;
            },
            'onUploadSuccess': function (file, data, response) {
                US7(data);
            }

        });
    }
};
var _Fun8 = {
    fileUploadify: function (fileID, ajaxPath, imgPathID, imgInfoClass) {
        //JinDu = fileID;
        jQuery("#" + fileID + "").uploadify({
            'width': Set.uploadify.width, 'height': Set.uploadify.height,
            'buttonImage': Set.uploadify.buttonImage,
            'multi': Set.uploadify.multi,
            'auto': Set.uploadify.auto,
            'successTimeout': 1000,
            //'onComplete': fun,
            'swf': Set.uploadify.swf,
            'queueID': Set.uploadify.queueID,
            'uploader': ajaxPath,
            'fileTypeExts': Set.uploadify.fileTypeExts,
            'fileTypeDesc': Set.uploadify.fileTypeDesc,
            'fileSizeLimit': Set.uploadify.fileSizeLimit,
            'queueSizeLimit': Set.uploadify.queueSizeLimit,
            'progressData': 'speed',
            'overrideEvents': ['onDialogClose'],
            'buttonText': Set.uploadify.buttonText,
            'onSelectError': function (file, errorCode, errorMsg) {
                switch (errorCode) {
                    case -100:
                        Msg.tip("error", "上传的文件数量已经超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'queueSizeLimit') + "个文件！", "");
                        break;
                    case -110:
                        Msg.tip("error", "文件 [" + file.name + "] 大小超出系统限制的" + jQuery("#" + fileID + "").uploadify('settings', 'fileSizeLimit') + "大小！", "");
                        break;
                    case -120:
                        Msg.tip("error", "文件 [" + file.name + "] 大小异常！", "");
                        break;
                    case -130:
                        Msg.tip("error", "文件 [" + file.name + "] 类型不正确！", "");
                        break;
                }
            },
            'onClearQueue': function (queueItemCount) {
                //alert("取消上传");
                return;
            },
            'onQueueComplete': function (queueData) {
                //alert("文件上传成功！");
                return;
            },
            'onUploadSuccess': function (file, data, response) {
                US8(data);
            }

        });
    }
};
